<?php
/**
 * Remove an item from the sharing system
 * 
 * 
 */

$xview = Xview::instance();
try {
	$inlineid = $xview->val('inlineid');
	$sharingItem = Fox\Dao::load(\Orx\User\Shared\Mailbox\Item::className(), $inlineid);
	$sharingItem->delete();
	Fox\Message::Success(Msg(Orx\Mailer\Messages::BUNDLE,Orx\Mailer\Messages::ITEM_REMOVED));
} catch(Fox\Object\Exception\NotExist $e) {
	Fox\Message::Error($e);
} catch(Fox\Object\Exception\Save $e) {
	Fox\Message::Error($e);
}
echo $xview->messages(true,true);